<?php
namespace app\controller;

use think\facade\Request;

//use think\Request;

class TestRequest{

    /*
    protected $request;

    public function __construct(Request $req)
    {
        $this->request=$req;
    }

    public function index(){
        return $_GET['id'];
    }
    public function index2(Request $request){
        return $request->param('id');
    }
    public function index3(){
        return $this->request->param('id');
    }
    
    public function index4(){
        return Request::param('id');
    }
    public function index5()
    {
        return request()->param('id');
    }*/

    public function index(){
        //return Request::host();
        //return Request::url(true);
        //return Request::baseFile();
        //return Request::controller();
        //return Request::action();
        //return Request::method();
        //return Request::param('username');
        //dump(Request::has('id','post'));     //var_dump()
        //return Request::get('id');
        //return Request::param('id');
        //print_r(Request::param(['name','gender']));
        //return Request::get('name','','htmlspecialchars');
        //return Request::param('id/d');
        //dump(input('?get.id'));
        //return input('get.id','','htmlspecialchars');
        //dump(Request::param('id','ff','strtoupper,htmlspecialchars'));
        return Request::param('id','ff','strtoupper');
    }
}